<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/7/24 0024
 * Time: 16:58
 */

namespace app\storage\model;


use think\Model;

class SmtMaterielModel extends Model
{

    protected $table = 'smt_materiel';
    protected $pk = 'uuid';

    public function getSmtMateriel($condition){
            $where = $condition['where'];
            $pageIndex = $condition['pageIndex'];
            $pageSize = $condition['pageSize'];
            $ret['total'] = $this->where($where)->count();
            $ret['row'] = $this->where($where)
                ->order('waste desc')
                ->page($pageIndex,$pageSize)
                ->select();
            return $ret;

    }

}